-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolver transform to emit imports for helper and modifiers that need… #1806
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me 👍 I think that this is in line with what we discussed in meetings and the fact that tests are passing gives me the confidence that this can be merged and released without much issue 👍
I pushed the above commits to clarify the code and explore how much was already correct here. By unifying the builtInKeywords list the types uncovered a case that wasn't handled (the use of built-in in ambiguous forms). But more changes are still needed here. The built-ins don't always win. For example, if you make Helpers are a little better. If you try to create your own Whatever decisions resolver-transform makes get cached in the babel-cache, and will endlessly troll people if the answers can change based on other side-effects in the system. Like upgrading your ember version across the 4.4. boundary. That is a big reason why we split the component/helper/modifier resolution out of here and into module-resolver. All of the above are reasons why I don't think we can hard-code these answers in resolver-transform. Rather, resolver-transform should delegate these cases to module-resolver, where we have much more information about what is available across the app and all addons, and where the answers won't live inside the babel cache. For example, I think we would entirely remove I realize that might seem like it adds extra work for your codemod use case, but I don't think it does. The codemod is already going to need to know how to follow a reexport like that, because effectively 100% of addon-provided components will go through similar reexports, and the codemod will need to follow through them. That is, |
Thank you for this @ef4 , also I'll work to fix up the tests as well |
a223c7a
to
213f90f
Compare
… them in strict mode templates
test updates to match new expectations
213f90f
to
8bde7b9
Compare
FYI I just rebased this against stable 👍 |
… them in strict mode templates